import request from '@/utils/request';

// 查询客户端用户列表
export function listUser(query) {
  return request({
    url: '/client/user/list',
    method: 'get',
    params: query,
  });
}

// 查询客户端用户详细
export function getUser(userId) {
  return request({
    url: '/client/user/' + userId,
    method: 'get',
  });
}

// 新增客户端用户
export function addUser(data) {
  return request({
    url: '/client/user',
    method: 'post',
    data: data,
  });
}

// 修改客户端用户
export function updateUser(data) {
  return request({
    url: '/client/user',
    method: 'put',
    data: data,
  });
}

// 修改客户端用户密码
export function resetPwd(data) {
  return request({
    url: '/client/user/resetPwd',
    method: 'put',
    data: data,
  });
}

// 修改客户端用户状态
export function changeStatus(data) {
  return request({
    url: '/client/user/changeStatus',
    method: 'put',
    data: data,
  });
}

// 修改客户端用户状态
export function removeDept(data) {
  return request({
    url: '/client/user/removeDept',
    method: 'put',
    data: data,
  });
}
